import config from "@/config"
import http from "@/utils/request"

export default {
	upload: {
		url: `${config.API_URL}/upload`,
		name: "文件上传",
		post: async function(data, config={}){
			return await http.post(this.url, data, config);
		}
	},
	uploadFile: {
		url: `${config.API_URL}/uploadFile`,
		name: "附件上传",
		post: async function(data, config={}){
			return await http.post(this.url, data, config);
		}
	},
	exportFile: {
		url: `${config.API_URL}/fileExport`,
		name: "导出附件",
		get: async function(data, config={}){
			return await http.get(this.url, data, config);
		}
	},
	importFile: {
		url: `${config.API_URL}/fileImport`,
		name: "导入附件",
		post: async function(data, config={}){
			return await http.post(this.url, data, config);
		}
	},
	file: {
		menu: {
			url: `${config.API_URL}/file/menu`,
			name: "获取文件分类",
			get: async function(){
				return {
					"code": 200,
					"data": [
					  {
						"id": "",
						"label": "未分组"
					  },
					  {
						"id": "100",
						"label": "素材"
					  },
					  {
						"id": "200",
						"label": "证件"
					  }
					],
					"message": ""
				}
				//return await http.get(this.url);
			}
		},
		list: {
			url: `${config.API_URL}/file/list`,
			name: "获取文件列表",
			get: async function(){
				return {
					"code": 200,
					"data": {
					  "total": 85060,
					  "page": 1,
					  "pageSize": 20,
					  "rows": [
						{
						  "id": "bAc475d2-c8E2-9edd-C9eE-C324987d5a63",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Donna Harris&_=.png",
						  "fileName": "EbF3CfFb-d47b-ECC8-5c7d-bF369Fdf0fF1.png"
						},
						{
						  "id": "Beae5B33-Ab4b-1DA9-e13a-6DfC4E9B4eEC",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Jeffrey Clark&_=.png",
						  "fileName": "e25F73F9-f534-B087-fD4D-f74DdccaFFBB.png"
						},
						{
						  "id": "B9f873EC-d7d1-5d6f-9F32-5DBDa804faEc",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=William White&_=.png",
						  "fileName": "c4CFA236-62cF-f2Eb-0883-CB1e4A9261f4.png"
						},
						{
						  "id": "4A872A24-E89A-a25F-9b19-0dc75a2C5a46",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Mary Thompson&_=.png",
						  "fileName": "Ef5B8FEA-5f5C-3267-EE25-2deDFF4dEDe1.png"
						},
						{
						  "id": "4dEbF6Ac-bD4B-EeB4-aAbf-AD88Cd0cA3f9",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Jason Brown&_=.png",
						  "fileName": "bDC29dd2-b4Ef-25DB-EC89-8d92eF72cc82.png"
						},
						{
						  "id": "1BbfDe1A-eBf8-49F0-64Ef-D7c2848eBa61",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Joseph Williams&_=.png",
						  "fileName": "C88F14A5-Fb5d-f13b-7cf3-7bdC7cbfb928.png"
						},
						{
						  "id": "9Fc1a647-ddCc-32CE-D13C-41cFCA1bfBa3",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Kenneth Hall&_=.png",
						  "fileName": "7DAF92ec-9e6C-fdCc-b7D2-dff4DAd6E2bC.png"
						},
						{
						  "id": "85B3b558-5b45-e61D-5400-5dcE088D7d8E",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Ronald Rodriguez&_=.png",
						  "fileName": "fE42A1d2-9FDf-E37E-4B18-E9d1CE4bDcA8.png"
						},
						{
						  "id": "D9A3CFDE-E9ad-d6db-cdb6-661BdB899Eb6",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Carol Johnson&_=.png",
						  "fileName": "25d3D4E1-B9AA-ee1b-bD6F-E2dC13709628.png"
						},
						{
						  "id": "817Ce4Df-F913-cfEe-CFFF-A6D9b7Cd5885",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Barbara Lopez&_=.png",
						  "fileName": "2E9334ae-8bff-90bC-F2cE-Fa91E4c1bbD8.png"
						},
						{
						  "id": "98CA55D7-e624-Eb54-C4F2-f0eB89DA5CCd",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Joseph Wilson&_=.png",
						  "fileName": "50bd57fa-6E03-E0b4-DCfe-FeAC878b9bE3.png"
						},
						{
						  "id": "C20A1E35-cf34-447F-667C-38Bab6e91EdC",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=John White&_=.png",
						  "fileName": "EB48134F-45d4-C8bF-D2ab-2A582DF9fF7D.png"
						},
						{
						  "id": "9CffEb6F-dE71-Fd9e-5cfA-BFa82D149c6b",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Patricia Thomas&_=.png",
						  "fileName": "Eb4Ef7Bd-1195-6E12-7dA4-bA4AFC60BCFD.png"
						},
						{
						  "id": "FEce27fe-B87F-202c-7D6F-47De328B7DdA",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Jeffrey White&_=.png",
						  "fileName": "B5f87FfD-3671-813d-45C3-8BdddfdEAc90.png"
						},
						{
						  "id": "fa135e6D-2BB2-9FB5-9853-ec4E8acb2d8D",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Daniel Moore&_=.png",
						  "fileName": "c8BB33F9-e7B5-46e1-aAFC-7B43b70Fe6B2.png"
						},
						{
						  "id": "C420D8B6-c33D-B9cc-E53e-9dAE37bf2bCd",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Sarah Thompson&_=.png",
						  "fileName": "5cD5cbDD-5F1F-c415-2BdD-D930337ddE7c.png"
						},
						{
						  "id": "f192b3d4-aFF6-4A01-ADA4-fd07AAC64aFf",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Christopher Taylor&_=.png",
						  "fileName": "B471AD7d-FC45-Df6c-F491-Be5c65466C9f.png"
						},
						{
						  "id": "BA7Bb7eB-9fed-9e7E-AB55-9ee9EB6d9A2c",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Maria Johnson&_=.png",
						  "fileName": "9BA4dc94-bD26-AF4C-9B4c-452BBF15EdDc.png"
						},
						{
						  "id": "FECB1e89-2F63-8981-218f-fD26f78CA319",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Carol Robinson&_=.png",
						  "fileName": "9b6DBa8E-2B68-467C-C443-D6f35Cb456E2.png"
						},
						{
						  "id": "eFA8c83c-d418-45A7-Bd2b-E44dDBbdc1cc",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Brenda Johnson&_=.png",
						  "fileName": "6bb31293-db9E-2307-25bf-fbEd9b83FE41.png"
						},
						{
						  "id": "ebadF675-3BfD-DA36-eEa9-bec395dE3AcE",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Thomas Robinson&_=.png",
						  "fileName": "FFDFe0Ab-464a-e815-74F8-23aed9E4e1Bc.png"
						},
						{
						  "id": "6d96bC25-ac59-84FD-5c38-2F1c2eFE9cAe",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Scott Martin&_=.png",
						  "fileName": "80da3FDf-34DA-bae7-4BBB-bcbfbd4c6D1e.png"
						},
						{
						  "id": "298AFdD3-cFf2-FD24-d6be-89042992D7C7",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Angela Miller&_=.png",
						  "fileName": "5D9d761f-B74b-CFfB-B7d8-96d7c4DF79e3.png"
						},
						{
						  "id": "c4C6C5d2-5Bf9-BEBd-3716-7bbB7c1BCd94",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Brian Gonzalez&_=.png",
						  "fileName": "B42Bc8B2-d62C-1EdC-A2be-8c78068dA7A9.png"
						},
						{
						  "id": "Cd71De4c-d4Fe-84dD-f6C1-c7e6B74d54CF",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Michelle Williams&_=.png",
						  "fileName": "F7fF8ecF-e66c-1cBf-7fd2-88A52ccE77d2.png"
						},
						{
						  "id": "Fc1fE8A0-e31D-4dfc-e9fF-037ed12efD2c",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Matthew Brown&_=.png",
						  "fileName": "930dBA5A-C78c-4b2c-FD78-5Fc637AD2181.png"
						},
						{
						  "id": "2FBe7981-deDB-DbB3-a808-e46d359C8fD0",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Timothy Garcia&_=.png",
						  "fileName": "9346BACB-0459-bcf3-1313-Ff279F25edcC.png"
						},
						{
						  "id": "4DCEdDD7-aAB2-Cfaa-Bb27-3C7D648Cb4fb",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Linda Hernandez&_=.png",
						  "fileName": "De4c64e9-6c38-f27a-e92D-CF3A6a5Cac64.png"
						},
						{
						  "id": "3C9469ac-FdE5-AdCa-137d-1D357dF4cf3b",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Betty Moore&_=.png",
						  "fileName": "D2bD5BD7-a06d-Fe8E-d4AB-3CbE43Fd4AC6.png"
						},
						{
						  "id": "A829E47A-eCe9-84Ed-dFE7-D70b29EC1C43",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Mary Miller&_=.png",
						  "fileName": "837A6150-bBE9-A80f-b9E5-6eDAEd80ADfD.png"
						},
						{
						  "id": "cfEBbEdF-DA1E-fe7d-EDcD-5fAC51F2A35F",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Anthony Lewis&_=.png",
						  "fileName": "D92BFc45-d99F-2557-eB2e-aAC37ACBc63D.png"
						},
						{
						  "id": "E42Fc832-FE5d-E27F-E066-fbbdf8ee5ebB",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Anthony Jackson&_=.png",
						  "fileName": "6A551f48-b0d8-ee67-fE9b-4c277415667a.png"
						},
						{
						  "id": "D97ABcEb-9eF5-53b9-35B6-3b91d7BCBaeB",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Michael Miller&_=.png",
						  "fileName": "83aaA67f-eCE9-8865-f37C-fe9E7bdeAfdd.png"
						},
						{
						  "id": "3782eFd2-F5B5-949e-aFf5-dcAECfce93ee",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Jose Rodriguez&_=.png",
						  "fileName": "4dAdD3ce-ACAd-AB50-6EE7-77Cc0a52cBa7.png"
						},
						{
						  "id": "7E8f3ceD-4DeB-fF68-1F5d-9Dd382de8B8d",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Margaret Martinez&_=.png",
						  "fileName": "1Fc1FFc3-8e79-C958-b2eD-eF38d17eb5bb.png"
						},
						{
						  "id": "E4EF35b1-5bff-7eFF-F6AA-451759DcA7ca",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Steven Brown&_=.png",
						  "fileName": "cA92D42c-B7f3-4fcd-DD8e-e76eACDF5cf7.png"
						},
						{
						  "id": "C7d4Ab8C-6AAd-df12-BDeA-E401b5C59B48",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Kenneth Brown&_=.png",
						  "fileName": "0377cFBe-9bE7-F3Bc-E9aD-E9EBc8BF2BC9.png"
						},
						{
						  "id": "B46B69dc-7DeA-5edB-2A6a-5979Dad8692D",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Donna Walker&_=.png",
						  "fileName": "eC3BeCCf-9aDE-FE87-5864-1bfD17a5cfeA.png"
						},
						{
						  "id": "7b393631-deb9-cF91-e03f-eE4325fC0A5D",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Daniel Walker&_=.png",
						  "fileName": "1C68dDc1-da2D-D2E3-45f4-7ca46Bbf95De.png"
						},
						{
						  "id": "332913d5-cfcc-4b4e-bFe8-Fee545dBEb91",
						  "url": "http://dummyimage.com/200x200/ddd/333&text=Sharon Walker&_=.png",
						  "fileName": "7f99fBcD-bCFA-182c-7F0E-e2c13c3462A3.png"
						}
					  ]
					},
					"message": ""
				  }
				//return await http.get(this.url, params);
			}
		}
	}
}
